import { SYSTEM } from '../api'
import { METHOD, request } from '@/utils/request'

/* 人员相关 */
// 新增
export async function addUser(params) {
    return request(`${SYSTEM}/user/save`, METHOD.POST, params)
}
// 删除
export async function delUser(params) {
    return request(`${SYSTEM}/user/del`, METHOD.POST, params)
}
// 批量删除
export async function delUserList(params) {
    return request(`${SYSTEM}/user/batchDel`, METHOD.POST, params)
}
// 修改
export async function updateUser(params) {
    return request(`${SYSTEM}/user/update`, METHOD.POST, params)
}
// 查询列表
export async function getUserList(params) {
    return request(`${SYSTEM}/user/page`, METHOD.POST, params)
}
// 根据id查询
export async function getUserInfo(params) {
    return request(`${SYSTEM}/user/get`, METHOD.POST, params)
}
// 导出
export async function exportUserList(params) {
    return request(`${SYSTEM}/user/export`, METHOD.GET, params)
}

export default {
    addUser,
    delUser,
    delUserList,
    updateUser,
    getUserList,
    getUserInfo,
    exportUserList
}